package ecs.core;

public abstract class BaseComponent implements IComponent{

    private IEntity _parent;
    private boolean _enable;

    @Override
    public boolean enable() {
        return _enable;
    }

    @Override
    public void enable(boolean flag) {
        _enable = flag;
    }

    @SuppressWarnings("unchecked")
    @Override
    public <T extends IEntity> T parent() {
        return (T)_parent;
    }


    @Override
    public <T extends IEntity> void parent(T parent) {
        _parent = parent;
    }
}
